<!DOCTYPE html>
<html>
<head>
<title>travelList.html</title>

<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">

<link rel="stylesheet" href="css/pubStyle.css" />
<link rel="stylesheet" href="css/travel.css" />
<style type="text/css">
<!--
body {
    background-color:#F7F7F7;
    margin: 0px;
}
-->
</style>
<script type="text/javascript" src="ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="js/cookie_util.js"></script>
<script type="text/javascript" src="js/jquery-1.11.1.js"></script>
<script type="text/javascript" src="js/sofa.js"></script>
<script type="text/javascript">
    var acctId = getCookie("uid");
    if (acctId == null) {
        window.location.href = "index.html";
    }
    var realName = getCookie("realName");
    var userType = getCookie("userType");
    var noteId = getCookie("noteId");
    if(noteId==""||noteId==null||noteId==undefined){
        alert("未获取到要查看的游记,请重试");
        window.location.href="travelList.html";
    }else{
        $.ajax({
            url:"/SofaGuest/travel/travelDetail.do",
            type:"post",
            data:{"noteId":noteId},
            dataType:"json",
            success:function(result){
                //alert(result.detial);
                var sofa = result.data;
                $("#arttitle").html("<h3>"+sofa.note_tatile+"</h3>");
                var artinfo = "<span>"+sofa.real_name+"</span><br/><span>"+sofa.user_type+
                              " | "+sofa.hasSofa+" | 已接待"+sofa.useCount+"人</span>"+
                              "<br/><span>发表于 "+sofa.send_date+"</span>";
                $("#artinfo").html(artinfo);
                $("#artrole").html(sofa.note_content);
            },
            error:function(){
                alert("获取游记详情失败,请稍后重试");
            }
        });
    }
    
    $(function(){
        $("#acctId").html(realName);
        logOut();
    });
    
</script>
</head>

<body>
  <div class="top">
    <div class="top-page">
      <div id="nav-title">
        <a href="homePage.html" class="title">首页</a> <a href="qrySofa.html" class="title">找沙发</a> <a href="addSofa.html"
          class="title">我有沙发</a> <a href="travelList.html" class="title">分享沙旅</a> <a href="personMan.html" class="title">个人管理</a>
      </div>
      <div id="loginfo">
        <span>当前登陆：</span> <span id="acctId"></span> <span><a href="Javascript:void(0)" id="safeout"  target="_self">安全退出</a></span>
      </div>
    </div>
  </div>
  <div class="main-page">
    <div class="main-content">
    <div class="emp-line"></div>
      <div class="qrySofaimg" id="travel-title">
        <span>&nbsp;&nbsp;查看帖子</span>
      </div>
      <div class="emp-line"></div>
      <div class="traveldetial">
        <div class="tophang">
            <span>帖子详情</span>
        </div>
        <div class="travel-top">
            <div id="arttitle">
                <h3>美丽的草原啊我的家~~~~~~</h3>
            </div>
            <div class="cuxian"></div>
            <div id="artinfo">
                <span>崔健|发表于 2017-04-18 22:22:22</span><br/>
                <span>沙主|有沙发|已接待8人</span>
            </div>
        </div>
        <div class="travel-buttom">
            <div id="artrole">
                
            </div>
            
        </div>
      </div>
    </div>
  </div>
  <div class="feet">
		<a href="homePage.html">首页</a><span>|</span>
		<a href="addSofa.html">新增沙发</a><span>|</span>
		<a href="register.html">入驻沙主</a><span>|</span>
		<a href="personMan.html">信息管理</a><span>|</span>
		<a href="adminman.html">后台管理</a><span>|</span>
		<a href="index.html">退出登录</a>
	</div>
</body>
</html>
